package com.wwdx.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wwdx.utils.ConstantHolder;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author liguoliang
 */
@Entity
@Table(name = "wwdx_vip_product")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WwdxVipProductModel implements Serializable{


    @Id
    @GeneratedValue
    @JsonIgnore
    private Long id;
    /**
     * 产品ID
     */
    private Long product_id;
    /**
     * 产品名称
     */
    private String product_name;
    /**
     * 现价
     */
    private BigDecimal price;
    /**
     * 原价
     */
    private BigDecimal original_price;
    @JsonIgnore
    private Integer status;
    /**
     * 限时活动
     */
    @DateTimeFormat(pattern = ConstantHolder.Constant.LOCAL_DATE_PATTERN2)
    private Date activity_time;
    /**
     * 推荐购买
     */
    private Integer recommend;
    /**
     * 产品类型 1:1周 2:1月 3:1年
     */
    private Integer type;
    @JsonIgnore
    private Integer sort;
    @Column(name = "gmt_created",updatable = false)
    @JsonIgnore
    private Date gmt_created;
    @JsonIgnore
    private Date gmt_modified;
}
